<?php

class Queue 
{
 	private $_data;
 	
 	private $_size;
 	
    public function __construct()
    {
    	$this->_data = array();
    	$this->_size = 0;
    }
    
    public function enqueue($data)
    {
    	++ $this->_size;
    	$this->_data[] = $data;
    }
    
    public function dequeue()
    {
    	-- $this->_size;
    	return array_shift($this->_data);
    }
    
    public function isEmpty()
    {
    	return $this->_size <= 0;
    }
}
?>